package com.youlu.campus.service.system.impl;
import com.youlu.campus.entity.SystemApolloConfig;
import com.youlu.campus.service.system.SystemApolloConfigService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.core.query.Query;
import org.springframework.stereotype.Service;

@Slf4j
@Service
public class SystemApolloConfigServiceImpl implements SystemApolloConfigService {
    @Autowired
    private MongoTemplate mongoTemplate;

    @Override
    public SystemApolloConfig find() {
        Query query = new Query();
        return mongoTemplate.findOne(query, SystemApolloConfig.class);
    }
}
